# Contributor: Maxim Karasev <begs@disroot.org>
# Maintainer: mio <miyopan@e.email>
pkgname=bombadillo
pkgver=2.4.0
pkgrel=17
pkgdesc="Non-web (gopher, gemini, finger) browser for the terminal"
url="https://bombadillo.colorfield.space/"
license="GPL-3.0-or-later"
arch="all"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://tildegit.org/sloum/bombadillo/archive/$pkgver.tar.gz"
builddir="$srcdir/bombadillo"

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make build
}

check() {
	go test ./...
}

package() {
	make DESTDIR="$pkgdir" PREFIX=/usr install
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/bombadillo/LICENSE
}

sha512sums="
ce9ac62e2d57d98c6acca35b0a054a7920ad2ea8fa315b11c881057d30022f3417cf8132cfd1e6038410ca8aef9d430eb946ed803b62a4a52d2ac64f71dd3a1a  bombadillo-2.4.0.tar.gz
"
